import request from '@/utils/request'
import qs from 'qs'

/**
 * 获取列表
 * @param limit
 * @param offset
 */
export function getTable6List(id) {
  return request({
    url: '/system/tableSix/getTable6List',
    method: 'post',
    data: qs.stringify({
      id
    })
  })
}

/**
 * 编辑或保存
 * @param id
 * @param name
 * @param imgJson
 * @param showState
 */
export function addOrEdit(id,
  tableOneId,
  jcrq, jcrqend,
  syrq,
  type,
  table1Json,
  jyy,
  fhy,
  ypbh,
  jcyj,
  jcxm,
  ypxz,
  jcbc,
  bzrybh,
  bzrybzz,
  bzrydzrq,
  bzryyxrq,
  zlyj1,
  zlyl2,
  zlyl3,
  bzqx,
  ypcl,
  cytj,
  jctj1,
  jctj2,
  jctj3,
  jctj4,
  jctj5,
  jctj6,
  jctj7,
  jctj8,
  fcgs1,
  fcgs2,
  fcgs3,
  fcgs4,
  bfs1,
  bfs2,
  bfs3,
  bfs4, zlyl4, jcyq, spz) {
  return request({
    url: '/system/tableSix/addOrEdit',
    method: 'post',
    data: qs.stringify({
      id,
      tableOneId,
      jcrq,
      jcrqend,
      syrq,
      type,
      table1Json,
      jyy,
      fhy,
      ypbh,
      jcyj,
      jcxm,
      ypxz,
      jcbc,
      bzrybh,
      bzrybzz,
      bzrydzrq,
      bzryyxrq,
      zlyj1,
      zlyl2,
      zlyl3,
      bzqx,
      ypcl,
      cytj,
      jctj1,
      jctj2,
      jctj3,
      jctj4,
      jctj5,
      jctj6,
      jctj7,
      jctj8,
      fcgs1,
      fcgs2,
      fcgs3,
      fcgs4,
      bfs1,
      bfs2,
      bfs3,
      bfs4,
      zlyl4, jcyq, spz
    })
  })
}

/**
 * 删除
 * @param id
 */
export function del(id) {
  return request({
    url: '/system/tableSix/del',
    method: 'post',
    data: qs.stringify({
      id
    })
  })
}

export function getInfo(id, table1Id) {
  return request({
    url: '/system/tableSix/getInfo',
    method: 'post',
    data: qs.stringify({
      id, table1Id
    })
  })
}

export function getProJectList(id, table1Id) {
  return request({
    url: '/system/tableSix/getProJectList',
    method: 'post',
    data: qs.stringify({
      id, table1Id
    })
  })
}
